﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ThreeByte.ActiveDeck.Config;
using System.Windows.Forms.Integration;
using PowerPoint = Microsoft.Office.Interop.PowerPoint;

namespace ThreeByte.ActiveDeck.Content.UesrResponse
{
    public partial class UserResponseOverlayForm : Form
    {

        public UserResponseOverlayForm(PowerPoint.Shape shape) {
            InitializeComponent();
            
            //TopMost = true;
            Top = (int)shape.Top;
            Left = (int)shape.Left;
            Width = (int)shape.Width;
            Height = (int)shape.Height;
            AllowTransparency = true;
            Opacity = 0.75;
            StartPosition = FormStartPosition.Manual;
            this.Location = new Point(Left, Top);

            //SetupUserResponseControl userResponseControl = new SetupUserResponseControl(config, currentGraphic);
            //userResponseControl.Close += new EventHandler<DialogResultEventArgs>(userResponseControl_Close);
            
            ////Add Setup Form
            //ElementHost elementHost = new ElementHost();
            //elementHost.Dock = DockStyle.Fill;
            //elementHost.Location = new Point(0, 0);
            //elementHost.Name = "elementHost";
            //elementHost.Child = userResponseControl;
            //elementHost.AutoSize = true;
            //this.Controls.Add(elementHost);

            Enabled = false;
        }

        protected override bool ShowWithoutActivation {
            get {
                return true;
            }
        }

        //protected override CreateParams CreateParams {
        //    get {
        //        CreateParams baseParams = base.CreateParams;

        //        baseParams.ExStyle |= (int)(
        //          Microsoft.Win32.ExtendedWindowStyles.WS_EX_NOACTIVATE |
        //          Win32.ExtendedWindowStyles.WS_EX_TOOLWINDOW);

        //        return baseParams;
        //    }
        //}


        //void userResponseControl_Close(object sender, DialogResultEventArgs e) {
        //    this.DialogResult = e.DialogResult;
        //}

    }
}
